<template>
    <div>
        <!-- banner 部分 -->
        <swipes :banner-list="bannerList" :is-full="true"></swipes>

        <!-- 内容展示 -->
        <ul class="mui-table-view mui-grid-view mui-grid-9">
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="/home/newslist">
                    <img src="../../images/menu1.png" alt="">
                    <div class="mui-media-body">新闻资讯</div>
                </router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="/home/photolist">
                    <img src="../../images/menu2.png" alt="">
                    <!-- 不需要角标 -->
                    <!--<span class="mui-badge">5</span></span>-->
                    <div class="mui-media-body">图片分享</div>
                </router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="/home/goodslist">
                    <img src="../../images/menu3.png" alt="">
                    <div class="mui-media-body">商品购买</div>
                </router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <a href="#">
                    <img src="../../images/menu4.png" alt="">
                    <div class="mui-media-body">留言反馈</div>
                </a>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <a href="#">
                    <img src="../../images/menu5.png" alt="">
                    <div class="mui-media-body">视频专区</div>
                </a>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <a href="#">
                    <img src="../../images/menu6.png" alt="">
                    <div class="mui-media-body">联系我们</div>
                </a>
            </li>
        </ul>


        <!-- 底部占位 -->
        <!--<div class="bottomDiv">-->

        </div>
    </div>
</template>

<script>

import {Toast} from 'mint-ui'
import swipes from '../generalComponents/Swipe.vue'
export default {
    data () {
        return {
            bannerList:null,
            baseURL:"http://rap2api.taobao.org/app/mock/231063/"
        }
    },
    created(){
        this.getBannerList();
    },
    methods:{
        getBannerList(){
            this.$http.get('http://rap2api.taobao.org/app/mock/149003/bannerList').then((result)=>{
                var needResult = result.body;
                var banner = needResult["banner"];
                if (banner.length > 0) {
                    this.bannerList = banner;
                } else {
                    Toast({
                        message:"失败",
                        duration:3000,
                        position:'bottom'
                    })
                }
            })
        }
    },
    components: {
        swipes
    }
}
</script>

<style scoped>

    .mui-grid-view.mui-grid-9 {
        border-top: 1px;
        background-color: white;
    }

.mui-grid-view.mui-grid-9 .mui-table-view-cell {
    border: none;
    background-color: white;
}

.mui-table-view .mui-media, .mui-table-view .mui-media-body {
    font-size: 13px;
}

.mui-table-view .mui-table-view-cell img {
    width: 60px;
    height: 60px;
}

.bottomSpan {
    text-align: center;
    font-size: 10px;
    color: #555555;
    opacity: 0.6;
}

.bottomDiv {
    height: 300px;
    background-color: #8a6de9;
}

</style>
